home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group93b.txt
/
000106_icon-group-sender _Sat May 15 19:16:59 1993.msg
< prev
next >
Wrap
Internet Message Format
|
1993-06-16
|
2KB
Received: from owl.CS.Arizona.EDU by cheltenham.cs.arizona.edu; Thu, 20 May 1993 08:01:56 MST
Received: by owl.cs.arizona.edu; Thu, 20 May 1993 08:01:53 MST
Date: 15 May 93 19:16:59 GMT
From: dog.ee.lbl.gov!pasteur!agate!howland.reston.ans.net!ux1.cso.uiuc.edu!uwm.edu!linac!uchinews!ellis!goer@ucbvax.Berkeley.EDU (Richard L. Goerwitz)
Organization: University of Chicago
Subject: Re: string stripping
Message-Id: <1993May15.191659.22110@midway.uchicago.edu>
References: <9305141710.AA04578@midway.uchicago.edu>, <1993May15.080016.8080@smds.com>
Sender: icon-group-request@cs.arizona.edu
To: icon-group@cs.arizona.edu
Status: R
Errors-To: icon-group-errors@cs.arizona.edu
rh@ishmael.UUCP (Richard Harter) writes:
>
>>Sean states:
>
>> If i have a string and i want to strip out certain characters
>> (internal ones, so trim won't do it), ...
>
>>This is a good problem
>
>It seems to me that this is the sort of thing that would be a one liner
>in languages that are strong in string processing.
It is a one-liner. The posting you are responding to suggested a one-
liner that seemed reasonably crisp: every base ||:= !full -- badchars.
A simple idiom, although not crystal clear to the uninitiated (kind of
like putting sed "s/\.-//g" in front of a newbie).
The fact is that the longer scanning solutions were actually far more
clear and elegant, and they demonstrate a general methodology for sol-
ving string processing problems that is far more powerful and flexible
than what you'll find in most supposed "string processing" languages.
Not to demean languages that use regular expressions. Though cryptic
and restricted in power, they are useful. Each tool has its own pur-
pose.
--
-Richard L. Goerwitz goer%midway@uchicago.bitnet
goer@midway.uchicago.edu rutgers!oddjob!ellis!goer